package com.example.ware.controller;

import com.example.ware.model.responseData.ResponseData;
import com.example.ware.service.ClassifyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/classify")
public class ClassifyController {

    @Autowired
    private ClassifyService classifyService;


//    获取分类的数据
    @GetMapping("/get")
    public ResponseData getClassify(){
        return new ResponseData(classifyService.list(),true,"获取数据",200);
    }
}
